#!/usr/bin/env python
# -*- codeing: utf-8 -*-
# @Time : 2021-07-10 18:31
# @Author : Wu Yizhang
# @Site ：www.rich-f.com
# @File: main.py.py
# @Software: PyCharm
# @Function: 
# @python：3.6.8
import os



if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'meiduo_mall.settings.dev'

from celery import Celery
celery_app = Celery("kukudou")


# 将刚刚的 config 配置给 celery
# 里面的参数为我们创建的 config 配置文件:
celery_app.config_from_object("celery_tasks.config")
# 让 celery_app 自动捕获目标地址下的任务:
# 就是自动捕获 tasks
celery_app.autodiscover_tasks(['celery_tasks.sms','celery_tasks.email'])

